import { lazy } from "react"
import Home from "../views/home"

import {
    LocationOutline,
    UnorderedListOutline,
    TruckOutline,
    UserOutline,
  } from 'antd-mobile-icons';
export interface IRouter{
    path:string,
    til:string,
    element:any,
    hidden?:boolean,
    icon?:JSX.Element,
    name?:string,
}

const routes:IRouter[] = [
    {
        path:'/',
        name:'home',
        til:'首页',
        element:Home,
        hidden:false,
        icon:<LocationOutline style={{ fontSize: '24px',}}/>,
    },
    {
       
        path:'/find',
        name:'find',
        til:'分类',
        element:lazy(()=>import('../views/find')),
        hidden:false,
        icon:<UnorderedListOutline style={{ fontSize: '24px',}}/>,
      
    },
    {
        path:'/shopCar',
        name:'shopCar',
        til:'购物车 ',
        element:lazy(()=>import('../views/shopCar')),
        hidden:false,
        icon:<TruckOutline style={{ fontSize: '24px',}}/>,
    },

    {
        path:'/my',
        name:'my',
        til:'我的',
        element:lazy(()=>import('../views/my')),
        hidden:false,
        icon:<UserOutline style={{ fontSize: '24px',}}/>,
    },
    {
        path:'/login',
        til:'登录',
        element:lazy(()=>import('../views/login')),
        hidden:true,
    },
    {
        path:'/topic/:id',
        til:'详情',
        element:lazy(()=>import('../views/topic')),
        hidden:true,
    },
    {
        path:'/order',
        til:'订单',
        element:lazy(()=>import('../views/my/order')),
        hidden:true,
    },
    {
        path:'/edit',
        til:'修改资料',
        element:lazy(()=>import('../views/my/edit')),
        hidden:true,
    },
    {
        path:'/content',
        til:'评价',
        element:lazy(()=>import('../views/my/content')),
        hidden:true,
    },
    {
        path:'/address',
        til:'我的地址',
        element:lazy(()=>import('../views/my/address')),
        hidden:true,
    },
    {
        path:'/set',
        til:'设置',
        element:lazy(()=>import('../views/my/set')),
        hidden:true,
    },
    {
        path:'/fruit',
        til:'果实币',
        element:lazy(()=>import('../views/my/fruit')),
        hidden:true,
    },
    {
        path:'/coupon',
        til:'优惠劵',
        element:lazy(()=>import('../views/my/coupon')),
        hidden:true,
    },
    {
        path:'/total',
        til:'结算',
        element:lazy(()=>import('../views/total')),
        hidden:true,
    },
    {
        path: '/pushAddress',
        til: '新增收货地址',
        element: lazy(() => import('../views/pushAddress')),
        hidden:true,
    },
    {
        path:'/map',
        til:'地址',
        element:lazy(()=>import('../views/map')),
        hidden:true,
    },
    {
        path:'/search',
        til:'搜索',
        element:lazy(()=>import('../views/search')),
        hidden:true,
    },
    {
        path: '/pay',
        til: '支付',
        element: lazy(() => import('../views/pay')),
        hidden:true,
    },
    {
        path: '/service',
        til: '客服',
        element: lazy(() => import('../views/my/service')),
        hidden:true,
    },
    {
        path: '/paydone',
        til: '支付',
        element: lazy(() => import('../views/paydone')),
        hidden:true,
    },
    {
        path:'*',
        til:'页面未找到',
        element:lazy(()=>import('../views/404')),
        hidden:true,
    },
]

export const stateRoutes = [


]

export default routes